package com.example.cloud.model.business.reservation;

import com.alibaba.fastjson.annotation.JSONField;
import com.example.cloud.model.common.CommonModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date;

/**
 * Created by wangtao on 2018/1/26.
 * 患者信息表
 */
@Entity(name = "basic_patient")
@EqualsAndHashCode(callSuper = true)
@Data
public class Patient extends CommonModel{
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    // 患者姓名
    @Column(name = "name")
    private String name;
    // 昵称
    @Column(name = "nick_name")
    private String nickName;
    // 病历号
    @Column(name = "medical_number")
    private String medicalNumber;
    // 性别
    @Column(name = "sex")
    private Integer sex;
    // 出生生日
    @Column(name = "birthday")
    @JSONField(format = "yyyy-MM-dd")
    private Date birthday;
    // 手机号码
    @Column(name = "phone")
    private String phone;
    // QQ
    @Column(name = "qq")
    private String qq;
    // 微信
    @Column(name = "weChat")
    private String weChat;
    // 邮箱
    @Column(name = "email")
    private String email;
    // 现住址
    @Column(name = "address")
    private String address;
    // 现常住地及生活时间
    @Column(name = "resident")
    private String resident;
    // 民族
    @Column(name = "ethnic")
    private Integer ethnic;
    // 婚姻状况
    @Column(name = "marital")
    private Integer marital;
    // 文化程度
    @Column(name = "culture")
    private Integer culture;
    // 职业
    @Column(name = "job")
    private Integer job;
    // 工作特点
    @Column(name = "job_charact")
    private Integer jobCharact;
    // 身份证
    @Column(name = "card")
    private String card;
    // 籍贯
    @Column(name = "origin")
    private String origin;
    // 患者来源
    @Column(name = "source")
    private Integer source;
    // 主管医生ID
    @Column(name = "doctor_id")
    private Long doctorId;
    // 主管医生姓名
    @Column(name = "doctor_name")
    private String doctorName;
    // 主管护士ID
    @Column(name = "nurse_id")
    private Long nurseId;
    // 主管护士姓名
    @Column(name = "nurse_name")
    private String nurseName;
    // 主管客服
    @Column(name = "customer_id")
    private Long customerId;
    // 客服名称
    @Column(name = "customer_name")
    private String customerName;
    // 是否会员{0: 非会员 1：会员}
    @Column(name = "is_member")
    private int isMember;
    // 信誉分
    @Column(name = "score",columnDefinition = "INT DEFAULT 1000")
    private int score;
    // 账户编号
    @Column(name = "account_id")
    private Long accountId;
    // 用户编号
    @Column(name = "user_id")
    private Long userId;
    // 组织机构编号
    @Column(name = "organ_id")
    private Long organId;
    // 组织机构名称
    @Column(name = "organ_name")
    private String organName;
}
